Data transmission method and apparatus

ABSTRACT

The technology of this application relates to a first device configured to perform backoff on a primary 20 MHz channel, to perform data transmission with a second device. When a first preset condition is met, the first device switches from the primary 20 MHz channel to a first channel, where the first channel is a channel preconfigured for communication between the first device and the second device, the first channel does not include the primary 20 MHz channel, and the first preset condition at least includes that the primary 20 MHz channel is in a busy state.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2021/111010, filed on Aug. 5, 2021, which claims priority toChinese Patent Application No. 202011120199.3, filed on Oct. 19, 2020.The disclosures of the aforementioned applications are hereinincorporated by reference in their entireties.

TECHNICAL FIELD

This application relates to the field of wireless communicationtechnologies, and in particular, to a data transmission method andapparatus.

BACKGROUND

The Institute of Electrical and Electronics Engineers (IEEE) 802.11 isone of mainstream wireless access standards and is widely used. In theIEEE 802.11a standard, only a bandwidth of 20 MHz is supported, but asupported bandwidth increases continuously in a subsequent standardevolution process. For example, in the 802.11n standard, a maximumbandwidth of 40 MHz is supported; and in the 802.11ac/ax standard, amaximum bandwidth of 160 (80+80) MHz is supported. To ensure backwardscompatibility during standard evolution, there is a unique primary 20MHz channel regardless of a bandwidth. The primary 20 MHz channel needsto be included when a device uses any bandwidth to send data. Thisresults in a problem that when the unique primary 20 MHz channel isbusy, all other idle secondary channels (or referred to as subordinatechannels) cannot be used, and this reduces system efficiency.

Currently, in a latest Wi-Fi standard (namely, the 802.11be standard), amaximum bandwidth of 320 MHz is supported. In the 802.11be standard, tomake full use of a channel, when an access point (AP) supports a largebandwidth (for example, 320 MHz), some stations (STAs) that support onlya small bandwidth (for example, only 80 MHz) are allowed to be scheduledto perform data transmission on a secondary channel, to avoid a case inwhich all STAs that support the small bandwidth are clustered on aprimary channel, and few STAs or no STA can perform data transmission onthe secondary channel. A typical method for transmitting data on thesecondary channel is as follows: Each STA supporting only 80 MHz isscheduled to park on a secondary 80 MHz channel of a 320 MHz channel;when the STA parks on any secondary 80 MHz channel other than a primary80 MHz channel, uplink data of the STA can be scheduled only by the APby using a trigger frame, and the STA cannot actively perform channelcontention and send the uplink data. Otherwise, sending end moments ofdata on a plurality of secondary 80 MHz channels may be different, andas a result, the AP cannot perform correct parsing.

Although the foregoing solution enables the AP to obtain an additionaltransmission opportunity on a non-primary channel, a data transmissiondelay between the AP and a same STA cannot be reduced, or a datatransmission throughput between the AP and the same STA cannot beincreased.

SUMMARY

This application provides a data transmission method and apparatus, toreduce a data transmission delay between two devices and increase a datatransmission throughput between the two devices.

According to a first aspect, a data transmission method is provided,including: A first device performs backoff on a primary 20 MHz channel,to perform data transmission with a second device; and when a firstpreset condition is met, the first device switches from the primary 20MHz channel to a first channel, where the first channel is a channelpreconfigured for communication between the first device and the seconddevice, the first channel does not include the primary 20 MHz channel,and the first preset condition at least includes that the primary 20 MHzchannel is in a busy state.

Based on the foregoing technical solution, because the first presetcondition at least includes that the primary 20 MHz channel is in thebusy state, when the preset condition is met, data transmission cannotbe performed between the first device and the second device by using theprimary 20 MHz channel. However, when the first preset condition is met,the first device switches from the primary 20 MHz channel to the firstchannel, and before the primary 20 MHz channel switches from the busystate to an idle state, there is a probability that the first device canobtain an additional transmission opportunity, to perform datatransmission with the second device. Compared with the conventionaltechnology in which data can be transmitted between the first device andthe second device only after the primary 20 MHz channel is switched fromthe busy state to the idle state, in this embodiment of thisapplication, there is a probability that the first device and the seconddevice can perform data transmission when the primary 20 MHz channel isin the busy state. Therefore, there is a probability that a datatransmission delay between the first device and the second device isreduced, and a data throughput between the first device and the seconddevice can be improved.

In a possible implementation, that the primary 20 MHz channel is in abusy state includes at least one of the following cases: The firstdevice receives a first overlapped basic service set (overlapped BSS,OBSS) frame on the primary 20 MHz channel; or the first devicedetermines that an energy detection result on the primary 20 MHz channelis a busy state; or the first device determines that a value of a firstnetwork allocation vector (NAV) on the primary 20 MHz channel is greaterthan 0.

In a possible implementation, the first preset condition furtherincludes that target duration is greater than or equal to first presetduration; and the target duration is remaining transmission duration ofthe first OBSS frame received by the first device on the primary 20 MHzchannel, or the target duration is remaining timing duration of thefirst NAV on the primary 20 MHz channel. In this way, a probability thatthe first device performs an unnecessary channel switching operation isreduced.

In a possible implementation, the method further includes: The firstdevice performs backoff on the first channel; and after the firstchannel backs off to 0, the first device performs data transmission withthe second device on the first channel.

In a possible implementation, when the first channel includes aplurality of subchannels, that the first device performs backoff on thefirst channel includes: The first device performs backoff on each of theplurality of subchannels. In this way, a channel can be obtained throughchannel contention as soon as possible, to reduce a data transmissiondelay.

In a possible implementation, the method further includes: If the firstdevice synchronizes to a physical frame header on any subchannel of thefirst channel, the first device suspends backoff on all subchannels ofthe first channel, and determines whether a physical frame correspondingto the physical frame header is an OBSS frame; and if the physical framecorresponding to the physical frame header is an OBSS frame, the firstdevice continues to perform backoff on each subchannel of the firstchannel; or if the physical frame corresponding to the physical frameheader is not an OBSS frame, the first device continues to suspendbackoff on all subchannels of the first channel until transmission ofthe physical frame corresponding to the physical frame header iscompleted; or if the physical frame corresponding to the physical frameheader is not an OBSS frame, the first device continues to suspendbackoff on all subchannels of the first channel until an NAV configuredfor the physical frame corresponding to the physical frame header isreduced to 0. In this way, a transmit/receive conflict problem of thefirst device is avoided.

In a possible implementation, the method further includes: The firstdevice receives a physical frame on any subchannel of the first channel;and if the first device determines that the physical frame is from a BSSto which the first device belongs, the first device suspends backoff onall subchannels of the first channel until transmission of the physicalframe is completed; or if the first device determines that the physicalframe is from a BSS to which the first device belongs, the first devicesuspends backoff on all subchannels of the first channel until an NAVconfigured for the physical frame is reduced to 0. In this way, aprobability that a transmit/receive conflict occurs on the first deviceis reduced.

In a possible implementation, when the first channel includes aplurality of subchannels, that the first device performs backoff on thefirst channel includes: The first device performs backoff on one of theplurality of subchannels; and when the subchannel is in a busy state,the first device switches, based on a preset sequence, to anothersubchannel in the plurality of subchannels to perform backoff. In thisway, flexibility of performing backoff by the first device is improved,and a case in which the first device cannot obtain a channel throughcontention because one subchannel is in a busy state for a long time isavoided.

In a possible implementation, that the subchannel is in a busy stateincludes at least one of the following cases: The first device receivesa second OBSS frame on the subchannel; or the first device detects noradio frame, but duration in which the first device determines that anenergy detection result on the subchannel is a busy state is greaterthan or equal to second preset duration; or the first device determinesthat a value of a second NAV on the subchannel is greater than 0.

In a possible implementation, the method further includes: The firstdevice performs energy detection on the subchannel; and when an energydetection value on the subchannel is greater than or equal to an energydetection threshold, the first device determines that the energydetection result on the subchannel is the busy state; or when an energydetection value on the subchannel is less than an energy detectionthreshold, the first device determines that the energy detection resulton the subchannel is an idle state, where the energy detection thresholdof the subchannel is set to a value less than −62 dBm and greater than−82 dBm. In this way, fairness of channel contention between the firstdevice and another device is ensured, and a case in which normaltransmission of the another device is affected because the first devicepreempts a channel obtained through contention by another device isavoided.

In a possible implementation, the method further includes: Beforeduration in which the first device switches from the primary 20 MHzchannel to the first channel reaches the target duration, the firstdevice switches from the first channel to the primary 20 MHz channel,where the target duration is the remaining transmission duration of thefirst OBSS frame received by the first device on the primary 20 MHzchannel, or the target duration is the remaining timing duration of thefirst NAV on the primary 20 MHz channel. In this way, a possibility thatthe first device misses an update opportunity of the first NAV on theprimary 20 MHz channel is reduced.

In a possible implementation, the method further includes: If the targetduration is the remaining timing duration of the first NAV on theprimary 20 MHz channel, the first device performs a blind recoveryoperation on the primary 20 MHz channel. In this way, fairness ofchannel contention between the first device and another device isensured, and a case in which normal transmission of the another deviceis affected because the first device preempts a channel obtained throughcontention by another device is avoided.

In a possible implementation, the method further includes: The firstdevice receives first indication information sent by the second device;or the first device sends first indication information to the seconddevice, where the first indication information is used to configure thefirst channel. Based on this implementation, a same first channel may bedetermined between the first device and the second device.

In a possible implementation, the method further includes: The firstdevice sends first request information to the second device, where thefirst request information is used to request to negotiate the firstchannel; and the first device receives first response information sentby the second device, where the first response information is used torespond to the first request information, and the first responseinformation is used to determine the first channel. Based on thisimplementation, a same first channel may be determined between the firstdevice and the second device.

In a possible implementation, the method further includes: The firstdevice receives first request information sent by the second device,where the first request information is used to request to negotiate thefirst channel; and the first device sends first response information tothe second device, where the first response information is used torespond to the first request information, and the first responseinformation is used to determine the first channel. Based on thisimplementation, a same first channel may be determined between the firstdevice and the second device.

In a possible implementation, the first channel is in one of thefollowing cases: The first channel is a secondary 20 MHz channel; or thefirst channel is a 20 MHz channel with a lowest frequency in an 80 MHzchannel; or the first channel is a 20 MHz channel with a highestfrequency in an 80 MHz channel.

In a possible implementation, the method further includes: The firstdevice receives second indication information sent by the second device;or the first device sends second indication information to the seconddevice, where the second indication information indicates whether toenable a first transmission mechanism, and the first transmissionmechanism is used by the first device and the second device to switchfrom the primary 20 MHz channel to the channel when the first presetcondition is met. Based on this implementation, the first transmissionmechanism may be flexibly enabled or disabled between the first deviceand the second device, so that the first transmission mechanism isapplied to a proper scenario.

In a possible implementation, the method further includes: The firstdevice sends second request information to the second device; and thefirst device receives second response information sent by the seconddevice, where the second request information is used to request toenable a first transmission mechanism, the second response informationis used to agree to or refuse to enable the first transmissionmechanism, and the first transmission mechanism is used by the firstdevice and the second device to switch from the primary 20 MHz channelto the channel when the first preset condition is met; or the secondrequest information is used to request to disable a first transmissionmechanism, and the second response information is used to agree to orrefuse to disable the first transmission mechanism. Based on thisimplementation, the first transmission mechanism may be flexibly enabledor disabled between the first device and the second device, so that thefirst transmission mechanism is applied to a proper scenario.

In a possible implementation, the method further includes: The firstdevice receives second request information sent by the second device;and the first device sends second response information to the seconddevice, where the second request information is used to request toenable a first transmission mechanism, the second response informationis used to agree to or refuse to enable the first transmissionmechanism, and the first transmission mechanism is used by the firstdevice and the second device to switch from the primary 20 MHz channelto the channel when the first preset condition is met; or the secondrequest information is used to request to disable a first transmissionmechanism, and the second response information is used to agree to orrefuse to disable the first transmission mechanism. Based on thisimplementation, the first transmission mechanism may be flexibly enabledor disabled between the first device and the second device, so that thefirst transmission mechanism is applied to a proper scenario.

In a possible implementation, the method further includes: The firstdevice receives third indication information sent by the second device;or the first device sends third indication information to the seconddevice, where the third indication information indicates a service typeof data transmitted on the first channel. Based on this implementation,a service type of data transmitted on the first channel may bedetermined between the first device and the second device, to helpreduce a transmission delay of data of the service type.

In a possible implementation, the method further includes: The firstdevice sends third request information to the second device, where thethird request information is used to request to negotiate a service typeof data transmitted on the first channel; and the first device receivesthird response information sent by the second device, where the thirdresponse information is used to respond to the third requestinformation, and the third response information is used to determine theservice type of the data transmitted on the first channel. Based on thisimplementation, a service type of data transmitted on the first channelmay be determined between the first device and the second device, tohelp reduce a transmission delay of data of the service type.

In a possible implementation, the method further includes: The firstdevice receives third request information sent by the second device,where the third request information is used to request to negotiate aservice type of data transmitted on the first channel; and the firstdevice sends third response information to the second device, where thethird response information is used to respond to the third requestinformation, and the third response information is used to determine theservice type of the data transmitted on the first channel. Based on thisimplementation, a service type of data transmitted on the first channelmay be determined between the first device and the second device, tohelp reduce a transmission delay of data of the service type.

According to a second aspect, a communication apparatus is provided,including a backoff module and a switching module. The backoff module isconfigured to perform backoff on a primary 20 MHz channel, to performdata transmission with a second device. The switching module isconfigured to: when a first preset condition is met, switch from theprimary 20 MHz channel to a first channel, where the first channel is achannel preconfigured for communication between the communicationapparatus and the second device, the first channel does not include theprimary 20 MHz channel, and the first preset condition at least includesthat the primary 20 MHz channel is in a busy state.

In a possible implementation, that the primary 20 MHz channel is in abusy state includes at least one of the following cases: A first devicereceives a first OBSS frame on the primary 20 MHz channel; or a firstdevice determines that an energy detection result on the primary 20 MHzchannel is a busy state; or a first device determines that a value of afirst NAV on the primary 20 MHz channel is greater than 0.

In a possible implementation, the first preset condition furtherincludes that target duration is greater than or equal to first presetduration; and the target duration is remaining transmission duration ofthe first OBSS frame received by the first device on the primary 20 MHzchannel, or the target duration is remaining timing duration of thefirst NAV on the primary 20 MHz channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The backoff module is furtherconfigured to perform backoff on the first channel. The communicationmodule is configured to perform data transmission with the second deviceon the first channel after the first channel backs off to 0.

In a possible implementation, the backoff module is specificallyconfigured to: when the first channel includes a plurality ofsubchannels, perform backoff on each of the plurality of subchannels.

In a possible implementation, the backoff module is further configuredto: if the backoff module synchronizes to a physical frame header on anysubchannel of the first channel, suspend backoff on all subchannels ofthe first channel, and determine whether a physical frame correspondingto the physical frame header is an OBSS frame; and if the physical framecorresponding to the physical frame header is an OBSS frame, continue toperform backoff on each subchannel of the first channel; or if thephysical frame corresponding to the physical frame header is not an OBSSframe, continue to suspend backoff on all subchannels of the firstchannel until transmission of the physical frame corresponding to thephysical frame header is completed; or if the physical framecorresponding to the physical frame header is not an OBSS frame,continue to suspend backoff on all subchannels of the first channeluntil an NAV configured for the physical frame corresponding to thephysical frame header is reduced to 0.

In a possible implementation, the backoff module is further configuredto: when the backoff module receives a physical frame on any subchannelof the first channel, if the backoff module determines that the physicalframe is from a BSS to which the first device belongs, suspend backoffon all subchannels of the first channel until transmission of thephysical frame is completed; or if the backoff module determines thatthe physical frame is from a BSS to which the first device belongs,suspend backoff on all subchannels of the first channel until an NAVconfigured for the physical frame is reduced to 0.

In a possible implementation, the backoff module is further configuredto: when the first channel includes a plurality of subchannels, performbackoff on one of the plurality of subchannels; and when the subchannelis in a busy state, switch, based on a preset sequence, to anothersubchannel in the plurality of subchannels to perform backoff.

In a possible implementation, that the subchannel is in a busy stateincludes at least one of the following cases: The first device receivesa second OBSS frame on the subchannel; or the first device detects noradio frame, but duration in which the first device determines that anenergy detection result on the subchannel is a busy state is greaterthan or equal to second preset duration; or the first device determinesthat a value of a second NAV on the subchannel is greater than 0.

In a possible implementation, the backoff module is further configuredto: perform energy detection on the subchannel; and when an energydetection value on the subchannel is greater than or equal to an energydetection threshold, determine that the energy detection result on thesubchannel is the busy state; or when an energy detection value on thesubchannel is less than an energy detection threshold, determine thatthe energy detection result on the subchannel is an idle state. Theenergy detection threshold of the subchannel is set to a value less than−62 dBm and greater than −82 dBm.

In a possible implementation, the switching module is further configuredto: before duration in which the first device switches from the primary20 MHz channel to the first channel reaches the target duration, switchfrom the first channel to the primary 20 MHz channel. The targetduration is the remaining transmission duration of the first OBSS framereceived by the first device on the primary 20 MHz channel, or thetarget duration is the remaining timing duration of the first NAV on theprimary 20 MHz channel.

In a possible implementation, the backoff module is further configuredto: if the target duration is the remaining timing duration of the firstNAV on the primary 20 MHz channel, perform a blind recovery operation onthe primary 20 MHz channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive first indication information sent by the second device, orsend first indication information to the second device. The firstindication information is used to configure the first channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: send first request information to the second device, where the firstrequest information is used to request to negotiate the first channel;and receive first response information sent by the second device, wherethe first response information is used to respond to the first requestinformation, and the first response information is used to determine thefirst channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive first request information sent by the second device, wherethe first request information is used to request to negotiate the firstchannel; and send first response information to the second device, wherethe first response information is used to respond to the first requestinformation, and the first response information is used to determine thefirst channel.

In a possible implementation, the first channel is in one of thefollowing cases: The first channel is a secondary 20 MHz channel; or thefirst channel is a 20 MHz channel with a lowest frequency in an 80 MHzchannel; or the first channel is a 20 MHz channel with a highestfrequency in an 80 MHz channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive second indication information sent by the second device; orsend second indication information to the second device. The secondindication information indicates whether to enable a first transmissionmechanism, and the first transmission mechanism is used by thecommunication apparatus and the second device to switch from the primary20 MHz channel to the channel when the first preset condition is met.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: send second request information to the second device; and receivesecond response information sent by the second device. The secondrequest information is used to request to enable a first transmissionmechanism, the second response information is used to agree to or refuseto enable the first transmission mechanism, and the first transmissionmechanism is used by the communication apparatus and the second deviceto switch from the primary 20 MHz channel to the channel when the firstpreset condition is met; or the second request information is used torequest to disable a first transmission mechanism, and the secondresponse information is used to agree to or refuse to disable the firsttransmission mechanism.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive second request information sent by the second device; andsend second response information to the second device. The secondrequest information is used to request to enable a first transmissionmechanism, the second response information is used to agree to or refuseto enable the first transmission mechanism, and the first transmissionmechanism is used by the communication apparatus and the second deviceto switch from the primary 20 MHz channel to the channel when the firstpreset condition is met; or the second request information is used torequest to disable a first transmission mechanism, and the secondresponse information is used to agree to or refuse to disable the firsttransmission mechanism.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive third indication information sent by the second device, orsend third indication information to the second device. The thirdindication information indicates a service type of data transmitted onthe first channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: send third request information to the second device, where the thirdrequest information is used to request to negotiate a service type ofdata transmitted on the first channel; and receive third responseinformation sent by the second device, where the third responseinformation is used to respond to the third request information, and thethird response information is used to determine the service type of thedata transmitted on the first channel.

In a possible implementation, the communication apparatus furtherincludes a communication module. The communication module is configuredto: receive third request information sent by the second device, wherethe third request information is used to request to negotiate a servicetype of data transmitted on the first channel; and send third responseinformation to the second device, where the third response informationis used to respond to the third request information, and the thirdresponse information is used to determine the service type of the datatransmitted on the first channel.

According to a third aspect, a communication apparatus is provided,where the communication apparatus includes a processor and atransceiver, and the processor and the transceiver are configured toimplement the method provided according to any implementation in thefirst aspect. The processor is configured to perform a processing actionin the corresponding method, and the transceiver is configured toperform a transmit/receive action in the corresponding method.

According to a fourth aspect, a computer-readable storage medium isprovided, where the computer-readable storage medium stores computerinstructions, and when the computer instructions are run on a computer,the computer is enabled to perform the method according to anyimplementation in the first aspect.

According to a fifth aspect, a computer program product includingcomputer instructions is provided. When the computer instructions arerun on a computer, the computer is enabled to perform the methodaccording to any implementation in the first aspect.

According to a sixth aspect, a chip is provided, including a processingcircuit and a transceiver pin, where the processing circuit and thetransceiver pin are configured to implement the method according to anyimplementation in the first aspect. The processing circuit is configuredto perform a processing action in a corresponding method, and thetransceiver pin is configured to perform a transmit/receive action inthe corresponding method.

It should be noted that for the technical effects brought by anyimplementation in the second aspect to the sixth aspect, refer to thetechnical effects brought by a corresponding implementation in the firstaspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is an example schematic diagram of channel division of a 320 MHzchannel according to an embodiment of this application;

FIG. 2 is another example schematic diagram of channel division of a 320MHz channel according to an embodiment of this application;

FIG. 3 is an example schematic diagram of a backoff procedure accordingto an embodiment of this application;

FIG. 4 is an example schematic diagram of channel contention on atemporary primary channel according to an embodiment of thisapplication;

FIG. 5 is an example schematic diagram of a system architecture of awireless local area network according to an embodiment of thisapplication;

FIG. 6(a) is an example flowchart of a data transmission methodaccording to an embodiment of this application;

FIG. 6(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 6(c) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 7(a) is an example flowchart of a data transmission methodaccording to an embodiment of this application;

FIG. 7(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 7(c) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 8(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 8(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 9(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 9(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 10(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 10(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 11(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 11(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 12(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 12(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 13(a) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 13(b) is an example flowchart of another data transmission methodaccording to an embodiment of this application;

FIG. 14 is an example schematic diagram of a structure of acommunication apparatus according to an embodiment of this application;and

FIG. 15 is an example schematic diagram of a hardware structure of acommunication apparatus according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

In descriptions of this application, unless otherwise specified, “/”means “or”. For example, A/B may represent A or B. A term “and/or” inthis specification describes only an association relationship betweenassociated objects and indicates that there may be at least threerelationships. For example, A and/or B may represent the following threecases: Only A exists, both A and B exist, and only B exists. Inaddition, “at least one” means one or more, and “a plurality of” meanstwo or more. Terms such as “first” and “second” do not limit a quantityand an execution sequence, and the terms such as “first” and “second” donot indicate a definite difference.

In this application, the word such as “example” or “for example” is usedto represent giving an example, an illustration, or a description. Anyembodiment or implementation scheme described as an “example” or “forexample” in this application should not be explained as being morepreferred or having more advantages than another embodiment orimplementation scheme. Exactly, use of the term such as “example” or“for example” is intended to present a related concept in a specificmanner.

It may be understood that “data transmission” and “transmitting data”mentioned in this application generally refer to communication. “Data”refers to communication information in general, and is not limited todata information, and may also be signaling information or the like.“Transmission” refers to sending and receiving in general.

The following briefly describes technical terms in embodiments of thisapplication, to help understand the technical solutions of thisapplication.

1. BSS

A BSS is used to describe a group of devices that can communicate witheach other in a wireless local area network (WLAN). The WLAN may includea plurality of BSSs. Each BSS has a unique identifier, which is referredto as a basic service set identifier (BSSID). Optionally, one BSS mayinclude one AP and a plurality of STAs associated with the AP.

2. Transmission opportunity (TXOP)

A TXOP is a basic unit in wireless channel access. The TXOP includes aninitial time point and maximum duration (TXOP limit). In the TXOP limit,a station that obtains the TXOP may not perform channel contentionagain, and continuously use a channel to transmit a plurality of dataframes.

The TXOP may be obtained through contention or hybrid coordinator (HC)allocation. A TXOP obtained through contention may be referred to as anenhanced distributed channel access (EDCA) TXOP. A TXOP obtained throughHC allocation may be referred to as a hybrid coordination functioncontrolled channel access (HCCA) TXOP.

It should be understood that this application does not include obtainingof the TXOP. For specific details of a manner of obtaining the TXOP,refer to the conventional technology.

3. Channel

In a WLAN, channels are usually classified into a primary channel and asecondary channel, and the secondary channel may include one or moresubchannels.

In an example, if division is performed by using 20 MHz as a basicbandwidth unit, when a bandwidth of a channel is 20 MHz, the channelincludes only one primary channel with a bandwidth of 20 MHz; and when abandwidth of a channel is greater than 20 MHz, the channel includes oneprimary channel with a bandwidth of 20 MHz, and one or more other 20 MHzchannels are secondary channels.

For example, FIG. 1 is a schematic diagram of channel division of a 320MHz channel according to an embodiment of this application. As shown inFIG. 1 , a 320 MHz frequency band may be divided into 16 20 MHzchannels. The 16 20 MHz channels may be sequentially numbered as achannel 1 to a channel 16. It should be understood that each numberrepresents a 20 MHz channel. In FIG. 1 , the channel 1 may be used as aprimary 20 MHz channel (P20), and the channel 2 may be used as asecondary 20 MHz channel (S20). The channel 1 and the channel 2 may beaggregated as a primary 40 MHz channel, and the channel 3 and thechannel 4 may be aggregated as a secondary 40 MHz channel. The channel 1to the channel 4 may be aggregated as a primary 80 MHz channel, and thechannel 5 to the channel 8 may be aggregated as a secondary 80 MHzchannel. The channel 1 to the channel 8 may be aggregated as a primary160 MHz channel, and the channel 9 to the channel 16 may be aggregatedas a secondary 160 MHz channel.

It should be understood that the primary 20 MHz channel is a commonchannel of operation for stations that are members of a basic serviceset (a common channel of operation for stations that are members of thebasic service set). Stations in the basic service set (BSS) may performcontention on the primary 20 MHz channel, to preempt channel resources.

The primary 20 MHz channel may not be the channel 1, and mayalternatively be another channel. In FIG. 1 , that the channel 1 is usedas the primary 20 MHz channel is used as an example for description. Inaddition, the secondary channel may alternatively have another name, forexample, a subordinate or auxiliary channel. Embodiments of thisapplication are not limited thereto.

It should be noted that the 802.11 system supports various channelbandwidths, for example, contiguous bandwidths of 20 MHz, 40 MHz, 80MHz, and 160 MHz, or discontinuous bandwidths of 80 MHz+80 MHz, or 320MHz, 240 MHz+80 MHz, and 160 MHz+160 MHz. In a next generation of the802.11 standard, the channel bandwidth may also be another bandwidth.Optionally, a channel division method thereof may be similar to that ofthe foregoing 320 MHz channel.

In a WLAN, a contiguous spectrum block for transmission may be referredto as a frequency segment. One WLAN channel may include a plurality offrequency segments, and a bandwidth of each frequency segment may be 80MHz, 40 MHz, 20 MHz, or 160 MHz. FIG. 2 is another schematic diagram ofchannel division of a 320 MHz channel according to an embodiment of thisapplication. As shown in FIG. 2 , for example, a bandwidth of a segmentis 80 MHz, the 320 MHz channel shown in FIG. 2 may be divided into foursegments. The frequency segment may alternatively be referred to as afrequency segment, or referred to as a segment for short.

4. Carrier sense mechanism

The carrier sense mechanism may be classified into a physical carriersense mechanism and a virtual carrier sense mechanism.

(1) The physical carrier sense mechanism is also referred to as clearchannel assessment (CCA). In a wireless communication system, before atarget device needs to transmit data on a channel, the target devicefirst receives data on the channel. If the target device does not findthat another device transmits data on the channel after a given time,the target device starts to transmit data. If the target device findsthat another device transmits data, the target device waits for a randomperiod of time and then reattempts the process.

Clear channel assessment includes packet detection and energy detection.Packet detection is to detect whether a data packet is transmitted on achannel (whether a data packet is transmitted may be determined bydetecting whether a packet header exists). If a data packet exists onthe channel and energy exceeds a packet detection threshold, the channelis considered busy. Energy detection is to detect energy on a channel.If energy on a channel is greater than or equal to an energy detectionthreshold, the channel is considered busy. Only when both results ofpacket detection and energy detection indicate that the channel is idle,the channel is considered to be in an idle state. In other words, if nopacket header is detected in a time period, and energy on the channel isless than the energy detection threshold during energy detection, thechannel is considered to be in an idle state.

The “energy detection” separately mentioned below in this applicationrefers to energy detection performed when no packet header is detected.In other words, when a result of the “energy detection” separatelymentioned below in this application is that a channel is idle, itindicates that the channel is in an idle state.

(2) The virtual carrier sense mechanism uses information discovered in802.11 frames to predict a status of a wireless medium. Generally,virtual carrier sense is provided by a NAV. One device may maintain oneor more NAVs. The NAV is a timer, and is set based on a value ofduration in a MAC header of the frame. A value of the NAV decreases astime elapses. If the NAV is not 0, it indicates that the wireless mediumis in a busy state. If the NAV is 0, it indicates that the wirelessmedium is in an idle state. The wireless medium may be a channel, afrequency band, or the like.

The NAV is set based on a duration value in a MAC header of a frame, andmay be specifically implemented as follows: After a station receives aframe, if a receiver address of the frame is not the station and a valueof a duration field in the frame is greater than a current value of aNAV of the station, the station may update the NAV based on the duration(duration) field in the received frame; or if a receiver address of theframe is the station (which indicates that the station is a receivingstation) or a value of a duration field in the frame is less than orequal to a current value of a NAV of the station, the NAV cannot beupdated. The value of the NAV starts from an end moment of the receivedwireless frame.

5. Backoff mechanism

An IEEE 802.11 standard allows a plurality of users to share a sametransmission medium. A transmitter checks availability of thetransmission medium before transmitting data. The IEEE 802.11 standarduses carrier sense multiple access with collision avoidance (CSMA/CA) toimplement channel contention. To avoid collision, the CSMA/CA adopts abackoff mechanism.

The backoff mechanism on a single channel is described below. Before adevice transmits a message, the device may select a random number from 0to a contention window (CW), and use the random number as an initialvalue of a backoff counter. After an idle time of the channel reaches anarbitration inter-frame space (AIFS), a count value of the backoffcounter decreases by 1 each time the channel is idle in a timeslot.Before the count value of the backoff counter decreases to 0, if thechannel is busy in one timeslot, the backoff counter stops counting.Then, if the channel changes from busy to idle in state and the idletime of the channel reaches the AIFS, the backoff counter resumescounting. When the count value of the backoff counter is 0, the backoffprocedure ends, and the device may start data transmission.

With reference to FIG. 3 , it is assumed that an initial value of abackoff counter is 5, and after an idle time of a channel reaches anAIFS, the backoff counter starts to perform a backoff Each time thechannel is in an idle state in one timeslot, a count value of thebackoff counter decreases by 1 until the count value of the backoffcounter is 0. After the count value of the backoff counter is 0, thedevice successfully obtains a channel through contention, and the devicemay transmit a PPDU on the channel.

The foregoing are technical terms used in embodiments of thisapplication, and are uniformly described herein.

Currently, in a latest Wi-Fi standard (namely, the 802.11be standard), amaximum bandwidth of 320 MHz is supported. In the 802.11be standard, tomake full use of a channel, when an AP supports a large bandwidth (forexample, 320 MHz), some STAs that support only a small bandwidth (forexample, only 80 MHz) are allowed to be scheduled to a specificsecondary channel to receive data, to avoid a case in which all STAsthat support the small bandwidth are clustered on a primary channel, andfew STAs or no STA can send or receive data on the secondary channel.

Therefore, when the AP receives an OBSS frame on the primary channel andsets a network allocation vector (NAV), the AP may switch from theprimary channel to a specific secondary channel to perform channellistening and backoff. In this application, the specific secondarychannel is referred to as a temporary primary channel. The temporaryprimary channel may also be referred to as a parking channel, a framereceiving channel, a backup channel, or another name in thisapplication. For ease of description, the following uses the name oftemporary primary channel for description. The temporary primary channelmay be temporarily used as an operating channel of a station, and thestation may park on or operate on the temporary primary channel toreceive signaling or data.

An example is used for description with reference to FIG. 4 . The AP mayschedule a STA 1 to a primary 20 MHz channel, and schedule a STA 2 to achannel 13. In other words, the channel 13 is a temporary primarychannel of the STA 2. When the AP is to send data to the STA 1, the APfirst performs backoff on the primary 20 MHz channel. When an OBSS frameis transmitted on a primary 80 MHz channel, the AP may determine thatthe primary 20 MHz channel is in a busy state. Therefore, the AP mayswitch to the channel 13 for channel contention. When the channel 13backs off to 0, the AP may use the channel 13 and other idle subchannels(for example, a channel 14, a channel 15, a channel 16, and an 80 MHzsegment 3 in FIG. 4 ) to send data to the STA 2.

In a related technical solution, the STA 1 parking on the primary 20 MHzchannel and the STA 2 parking on the temporary primary channel are not asame STA. In this case, when the primary channel is in the busy state,although the AP may obtain an additional transmission opportunity on thetemporary primary channel, data sent by the AP on the temporary primarychannel cannot be received by the STA 1 parking on the primary channel.The AP can continue to contend for a channel only after the primary 20MHz channel is switched from the busy state to an idle state, to senddata to the STA 1 parking on the primary 20 MHz channel. Therefore, therelated technical solution cannot achieve an objective of reducing adata transmission delay between the AP and the STA 1 or increasing adata transmission throughput between the AP and the STA 1.

To solve this technical problem, an embodiment of this applicationprovides a data transmission method. A specific idea of the datatransmission method is as follows: A first device and a second deviceperform data transmission (or perform backoff) on a primary 20 MHzchannel; and when a first preset condition (for example, the primary 20MHz channel is in the busy state) is met, both the first device and thesecond device are switched from the primary 20 MHz channel to apre-negotiated first channel. It should be understood that the firstdevice and the second device may be an AP or a STA.

Compared with the conventional technology in which data can betransmitted between the first device and the second device only afterthe primary channel is switched from the busy state to the idle state,the technical solutions provided in this application can enable thefirst device and the second device to transmit data by using anotherchannel in a time period when the primary channel is in the busy state,to effectively reduce a data transmission delay.

An embodiment of this application provides a data transmission method,and the method may be applied to various communication systems, forexample, a system using the IEEE 802.11 standard. For example, the IEEE802.11 standard includes but is not limited to the 802.11be standard ora next-generation 802.11 standard. Scenarios to which the technicalsolutions of this application are applicable include communicationbetween an AP and a STA, communication between APs, communicationbetween STAs, and the like.

FIG. 5 is a schematic diagram of a system architecture of a wirelesslocal area network according to an embodiment of this application. Asshown in FIG. 5 , the wireless local area network may include one AP andone or more stations (for example, a STA 1, a STA 2, and a STA 3 in FIG.5 ). The AP may access the Internet in a wired or wireless manner, theAP may be associated with a plurality of STAs, and uplink and downlinkcommunication may be performed between the AP and the plurality ofassociated STAs by using the 802.11 protocol. The 802.11 protocol mayinclude IEEE 802.11be, and may further include protocols such as IEEE802.11ax and IEEE 802.11ac. It is clear that with continuous evolutionand development of communication technologies, the 802.11 protocol mayfurther include a next-generation protocol of IEEE 802.11be, and thelike. An apparatus for implementing the method in this application maybe an AP or a STA in the WLAN, or a chip or a processing systeminstalled in an AP or a STA.

An access point (the AP in FIG. 5 ) is an apparatus having a wirelesscommunication function, supports communication by using a WLAN protocol,and has a function of communicating with another device (such as astation or another access point) in a WLAN network. Certainly, theaccess point may further have a function of communicating with anotherdevice. In a WLAN system, the access point may be referred to as anaccess point station (AP STA). The apparatus having a wirelesscommunication function may be an entire device, or may be a chip or aprocessing system installed in an entire device. The device in which thechip or the processing system is installed may implement the method andthe function in embodiments of this application under control of thechip or the processing system. The AP in embodiments of this applicationis an apparatus that provides a service for a STA, and may support the802.11 series protocols. For example, the AP may be a communicationentity, for example, a communication server, a router, a switch, or abridge. The AP may include a macro base station, a micro base station, arelay station, and the like in various forms. Certainly, the AP mayalternatively be a chip or a processing system in these devices invarious forms, to implement the method and the function in embodimentsof this application.

A station (for example, the STA 1, the STA 2, or the STA 3 in FIG. 5 )is an apparatus having a wireless communication function, supportscommunication by using a WLAN protocol, and has a capability ofcommunicating with another station or an access point in a WLAN network.In a WLAN system, the station may be referred to as a non-access pointstation (non-AP STA). For example, the STA is any user communicationdevice that allows a user to communicate with an AP and furthercommunicate with a WLAN. The apparatus having a wireless communicationfunction may be an entire device, or may be a chip or a processingsystem installed in an entire device. The device in which the chip orthe processing system is installed may implement the method and thefunction in embodiments of this application under control of the chip orthe processing system. For example, the STA may be user equipment thatcan connect to the Internet, for example, a tablet computer, a desktopcomputer, a laptop computer, a notebook computer, an ultra-mobilepersonal computer (UMPC), a handheld computer, a netbook, a personaldigital assistant (PDA), or a mobile phone. Alternatively, the STA maybe an Internet of things node in the Internet of things, avehicle-mounted communication apparatus in the Internet of vehicles, anentertainment device, a game device or system, a global positioningsystem device, or the like. The STA may alternatively be a chip and aprocessing system in the foregoing terminals.

A WLAN system may provide high-speed and low-delay transmission. Withcontinuous evolution of WLAN application scenarios, the WLAN system isto be applied to more scenarios or industries, for example, the internetof things industry, the internet of vehicles industry, the bankingindustry, enterprise offices, exhibition halls of stadiums, concerthalls, hotel rooms, dormitories, wards, classrooms, supermarkets,squares, streets, production workshops and warehousing. Certainly, adevice (such as an access point or a station) that supports WLANcommunication may be a sensor node (for example, a smart water meter, asmart electricity meter, or a smart air detection node) in a smart city,a smart device (for example, a smart camera, a projector, a display, atelevision, a stereo, a refrigerator, or a washing machine) in a smarthome, a node in the internet of things, an entertainment terminal (forexample, an AR, a VR, or another wearable device), a smart device insmart office (for example, a printer, a projector, a loudspeaker, or astereo), an internet of vehicles device in the internet of vehicles, aninfrastructure (for example, a vending machine, a self-servicenavigation station of a supermarket, a self-service cash registerdevice, or a self-service ordering machine) in daily life scenarios, adevice in a large sports and music venue, and the like. Specific formsof the STA and the AP are not limited in embodiments of thisapplication, and are merely examples for description herein.

For a first device, FIG. 6(a) shows a data transmission method accordingto an embodiment of this application. The method includes the followingsteps.

S101: The first device performs backoff on a primary 20 MHz channel, toperform data transmission with a second device.

The first device may be an AP or a STA. The second device may be an APor a STA.

In this embodiment of this application, the first device may configurean initial value of a backoff counter on the primary 20 MHz channelbased on a contention window on the primary 20 MHz channel. In addition,each time the primary 20 MHz channel is in an idle state in a timeslot,the first device may decrease a count value of the backoff counter onthe primary 20 MHz channel by 1. If the primary 20 MHz channel changesto a busy state at a moment, the first device suspends backoff. Then,the first device needs to wait until an idle time of the primary 20 MHzchannel reaches a preset inter-frame space, before continuing to performbackoff.

After the backoff counter of the primary 20 MHz channel is decreased to0, the first device may determine, on a primary channel between thefirst device and the second device, a second channel for datatransmission. The second channel includes one or more subchannels thatare in an idle state and that are in the primary channel at a momentwhen the backoff counter is decreased to 0.

The primary channel between the first device and the second deviceincludes the primary 20 MHz channel. For example, the primary channelmay be the primary 20 MHz channel, or may be a primary 40 MHz channel, aprimary 80 MHz channel, or a primary 160 MHz channel. This is notlimited in this embodiment of this application. Preamble puncturing maybe used on the primary channel, or preamble puncturing may not be usedon the primary channel.

The primary channel between the first device and the second device maybe determined by the first device and the second device throughnegotiation, or may be defined in a standard.

It should be understood that, before the backoff counter that is of theprimary 20 MHz channel and that is configured by the first device isdecreased to 0, or in a process in which the first device and the seconddevice perform data transmission on the second channel, the first devicemay perform the following step S102.

S102: When a first preset condition is met, the first device switchesfrom the primary 20 MHz channel to a first channel.

The first channel is a channel preconfigured for communication betweenthe first device and the second device. The first channel does notinclude the primary 20 MHz channel.

It should be understood that, before the embodiment shown in FIG. 6(a)is performed, the first device and the second device may negotiate witheach other to determine the first channel; or the first device and thesecond device may determine the first channel according to a standard.

For example, when the first channel is defined in a standard, the firstchannel may be one of the following cases: (1) The first channel is asecondary 20 MHz channel; or (2) the first channel is a 20 MHz channelwith a lowest frequency in an 80 MHz channel; or (3) the first channelis a 20 MHz channel with a highest frequency in an 80 MHz channel.Optionally, the 80 MHz channel may be any 80 MHz channel in a 320 MHzchannel.

In this embodiment of this application, the first channel is located ina bandwidth supported by the first device, and is also located in abandwidth supported by the second device. In this way, both the firstdevice and the second device can use the first channel, to ensure thatdata can be normally transmitted between the first device and the seconddevice on the first channel.

It should be understood that the first channel determined by the firstdevice and the first channel determined by the second device are a samechannel, to ensure that the first device and the second device canswitch from the primary 20 MHz channel to the same channel, and ensurethat data transmission can be performed between the first device and thesecond device on the first channel.

A bandwidth of the first channel is not limited in this embodiment ofthis application. For example, the bandwidth of the first channel may be20 MHz, 40 MHz, 80 MHz, or another type of bandwidth. Preamblepuncturing may be used on the first channel, or preamble puncturing maynot be used on the first channel.

In this embodiment of this application, the first preset condition atleast includes that the primary 20 MHz channel is in the busy state.

It should be understood that, that the primary 20 MHz channel is in thebusy state indicates that the primary channel between the first deviceand the second device cannot be used. Therefore, the first device mayswitch from the primary 20 MHz channel to the first channel to obtain anadditional transmission opportunity, to perform data transmission withthe second device before the primary 20 MHz channel is idle, so that adata transmission delay can be reduced.

Optionally, that the primary 20 MHz channel is in the busy state mayinclude at least one of the following cases.

Case 1-1: The first device receives a first OBSS frame on the primary 20MHz channel.

For example, after receiving a radio frame, the first device maydetermine, based on a SIG A field in the radio frame or an address fieldin a MAC frame header in the radio frame, whether the radio frame is anOBSS frame. For example, if a BSS color in an HE SIG A (or EHT SIG A)field in the radio frame is different from a BSS color to which thefirst device belongs, the first device may determine that the radioframe is an OBSS frame. For another example, if a BSSID in the MAC frameheader in the radio frame is different from a BSSID of a BSS to whichthe first device belongs, the first device may determine that the radioframe is an OBSS frame. The foregoing content is only a briefintroduction to a specific implementation in which the first devicedetermines whether a radio frame is an OBSS frame. For specific details,refer to the conventional technology.

Case 1-2: The first device determines that an energy detection result ofthe primary 20 MHz channel is a busy state.

Optionally, the first device performs energy detection on the primary 20MHz channel. When an energy detection value on the primary 20 MHzchannel is greater than or equal to an energy detection threshold, thefirst device determines that the energy detection result on the primary20 MHz channel is the busy state. Conversely, the first devicedetermines that the energy detection result on the primary 20 MHzchannel is an idle state. The energy detection threshold is set to −62dBm.

Cases 1-3: The first device determines that a value of a first NAV onthe primary 20 MHz channel is greater than 0.

Optionally, if the first device maintains two NAVs, for example, an NAVof another cell, namely, a basic NAV, and an NAV of a local cell,namely, an intra-BSS NAV, the first NAV may be the basic NAV. If thecommunication device can maintain only one NAV (regardless that a frameis from a local cell or another cell, if a receiver address of the frameis not the communication device and a value of a duration field in theframe is greater than a current value of the NAV, the NAV is updated),the first NAV is the NAV maintained by the communication device.

Optionally, the first preset condition may further include that targetduration is greater than or equal to first preset duration. The firstpreset duration may be determined by the first device and the seconddevice through negotiation, or may be defined in a standard.

When the primary 20 MHz channel is in the busy state as in the Case 1-1,the target duration may be remaining transmission duration of the firstOBSS frame, or the target duration may be remaining timing duration ofthe first NAV on the primary 20 MHz channel.

When the primary 20 MHz channel is in the busy state as in the Case 1-2or the Case 1-3, the target duration may be remaining timing duration ofthe first NAV on the primary 20 MHz channel.

It should be understood that, after switching to the first channel, thefirst device further needs to perform channel contention before sendingdata. Considering a time required for channel contention and a datasending time, if the target duration is short (that is, the targetduration is less than the first preset duration), it may be difficultfor the first device to perform data transmission with the second deviceon the first channel within the target duration. In this case, it isless necessary for the first device to switch from the primary 20 MHzchannel to the first channel. Therefore, when the target duration isless than the first preset duration, the first device does not switchfrom the primary 20 MHz channel to the first channel. This can simplifyoperations.

If the target duration is long (that is, the target duration is greaterthan or equal to the first preset duration), there is a high probabilitythat the first device can obtain a transmission opportunity on the firstchannel to transmit data. In this case, the first device switches fromthe primary 20 MHz channel to the first channel. This helps obtain anadditional transmission opportunity to reduce a data transmission delay.

Optionally, that the first device switches from the primary 20 MHzchannel to the first channel may be specifically implemented as follows:A function module, such as a physical frame header synchronizationmodule or a packet parsing module, configured for the first device,processes a signal received on the first channel.

It should be understood that a process in which the first deviceswitches from the primary 20 MHz channel to the first channel is merelya switching process of a digital processing module, and does not involvefrequency switching of a radio frequency and analog component.Therefore, a delay generated in the process in which the first deviceswitches from the primary 20 MHz channel to the first channel is small,and is usually negligible.

Based on the embodiment shown in FIG. 6(a), because the first presetcondition at least includes that the primary 20 MHz channel is in thebusy state, when the preset condition is met, data transmission cannotbe performed between the first device and the second device by using theprimary 20 MHz channel. However, when the first preset condition is met,if the first device switches from the primary 20 MHz channel to thefirst channel, before the primary 20 MHz channel switches from the busystate to the idle state, there is a probability that the first devicecan obtain an additional transmission opportunity, so as to perform datatransmission with the second device. Compared with the conventionaltechnology in which data can be transmitted between the first device andthe second device only after the primary 20 MHz channel is switched fromthe busy state to the idle state, this embodiment of this applicationprovides a probability for the first device and the second device toperform data transmission when the primary 20 MHz channel is in the busystate. Therefore, there is a probability that a data transmission delaybetween the first device and the second device is reduced, and a datathroughput between the first device and the second device can beimproved.

Optionally, based on the embodiment shown in FIG. 6(a), as shown in FIG.6(b), after step S102, the data transmission method may further includestep S103. Optionally, the data transmission method may further includestep S104.

S103: The first device performs backoff on the first channel.

The first channel may include one or more subchannels. Optionally, abandwidth of the subchannel included in the first channel may be 20 MHz.

Optionally, when the first channel includes a plurality of subchannels,step S103 may be performed in one of the following implementations:

Implementation 1 of step S103: The first device performs backoff on eachof the plurality of subchannels.

Based on the implementation 1, the first device configures a backoffcounter for each of the plurality of subchannels. It should beunderstood that initial values of backoff counters of differentsubchannels may be configured to be a same value or different values.This is not limited.

It should be understood that advantages of the implementation 1 are thatthe implementation 1 has high flexibility, and a transmissionopportunity can be quickly obtained when channel load is low, so that aprobability of obtaining the transmission opportunity can be increased.

Optionally, if the implementation 1 is used in step S103, the firstdevice further needs to perform the following operation 1 or operation 2in a process in which the first device performs backoff.

Operation 1: If the first device synchronizes to a physical frame headeron any subchannel of the first channel, the first device suspendsbackoff on all subchannels of the first channel, and determines whethera physical frame corresponding to the physical frame header is an OBSSframe. If the physical frame corresponding to the physical frame headeris an OBSS frame, the first device continues to perform backoff on eachsubchannel of the first channel. If the physical frame corresponding tothe physical frame header is not an OBSS frame, the first devicecontinues to suspend backoff on all subchannels of the first channeluntil transmission of the physical frame corresponding to the physicalframe header is completed. Alternatively, if the physical framecorresponding to the physical frame header is not an OBSS frame, thefirst device continues to suspend backoff on all subchannels of thefirst channel until an NAV configured for the physical framecorresponding to the physical frame header is reduced to 0.

If the physical frame corresponding to the physical frame header is notan OBSS frame, it indicates that the physical frame corresponding to thephysical frame header is a frame of the BSS to which the first devicebelongs.

For the first channel, the NAV configured for the physical framecorresponding to the physical frame header is an NAV configured by thefirst device based on a duration field in the physical frame.

That the first device continues to perform backoff on each subchannel ofthe first channel specifically means that, for each subchannel, thefirst device determines, based on a busy/idle state of the subchannel,whether to decrease a count value of a backoff counter corresponding tothe subchannel by 1. It should be understood that, for a subchannel fortransmitting an OBSS frame, the first device may detect that thesubchannel is in a busy state. Therefore, the first device suspendscounting of a backoff counter corresponding to the subchannel.

It should be understood that the operation 1 requires that a physicalframe header synchronization module is configured for the first deviceon each subchannel of the first channel.

Optionally, the operation 1 further requires that at least one set ofpacket parsing modules is configured for the first device.

It should be understood that, if a subchannel of the first channel backsoff to 0 in a time period in which the first device receives a physicalframe sent to the first device, the first device is triggered to sendthe physical frame. As a result, in a same time period, the first devicereceives a physical frame on a subchannel, and sends the physical frameon another subchannel. In this case, if the first device does not have asimultaneous transmit/receive capability, a transmit/receive conflictoccurs in the first device. Therefore, a beneficial effect of theoperation 1 is as follows: Starting from synchronizing to a physicalframe header on any subchannel of the first channel, backoff on allsubchannels is suspended, to avoid a problem that the transmit/receiveconflict occurs on the first device.

Operation 2: The first device receives a physical frame on anysubchannel of the first channel. If the first device determines that thephysical frame is from the BSS to which the first device belongs, thefirst device suspends backoff on all subchannels of the first channeluntil transmission of the physical frame is completed. Alternatively, ifthe first device determines that the physical frame is from the BSS towhich the first device belongs, the first device suspends backoff on allsubchannels of the first channel until an NAV configured for thephysical frame is reduced to 0.

It should be understood that the operation 2 requires that a physicalframe header synchronization module and a packet parsing module areconfigured for the first device on each subchannel of the first channel.

A beneficial effect of the operation 2 is as follows: If the firstdevice determines that a physical frame received on a subchannel is fromthe BSS to which the first device belongs, the first device suspendsbackoff on all subchannels, to avoid that a subchannel backs off to 0 ina process of receiving the physical frame, so that a possibility of theproblem that the transmit/receive conflict occurs on the first device isreduced.

Implementation 2 of step S103: The first device performs backoff on oneof the plurality of subchannels. When the subchannel is in a busy state,the first device switches, based on a preset sequence, to anothersubchannel in the plurality of subchannels to perform backoff.

It should be understood that advantages of the implementation 2 are asfollows: (1) Only one set of packet parsing modules needs to beconfigured for the first device, and a requirement for a devicecapability is low. (2) When one subchannel is in a busy state, the firstdevice switches to another subchannel to perform backoff. This helpsobtain a transmission opportunity as soon as possible and increases aprobability of obtaining the transmission opportunity.

The implementation 2 of step S103 is described by using an example. Itis assumed that the first channel configured between the first deviceand the second device includes a subchannel 1 to a subchannel 4. Apreset sequence is: the subchannel 4, the subchannel 2, the subchannel3, and the subchannel 1. Therefore, when the first preset condition ismet, the first device first switches from the primary 20 MHz channel tothe subchannel 4, and performs backoff on the subchannel 4. When thesubchannel 4 is in a busy state, the first device switches from thesubchannel 4 to the subchannel 2 to perform backoff. When the subchannel2 is in a busy state, the first device switches from the subchannel 2 tothe subchannel 3 to perform backoff. When the subchannel 3 is in a busystate, the first device switches from the subchannel 3 to the subchannel1 to perform backoff.

Optionally, the preset sequence may be implemented in any one of thefollowing implementations.

Implementation 1: The preset sequence is a sequence in which a pluralityof subchannels are sorted based on priorities. A priority of eachsubchannel may be determined by the first device and the second devicethrough negotiation, or may be defined in a standard.

Implementation 2: The preset sequence is a sequence in which a pluralityof subchannels are sorted in descending order of frequencies.Alternatively, the preset sequence may be a sequence in which theplurality of subchannels are sorted in ascending order of frequencies.

Implementation 3: The preset sequence may be a sequence in which aplurality of subchannels are sorted in ascending order of channel load.

Implementation 4: The preset sequence is a sequence generated byrandomly sorting a plurality of subchannels.

It should be understood that the foregoing implementation 1 toimplementation 4 are merely examples of the preset sequence, and thisembodiment of this application is not limited thereto.

It should be noted that the first device and the second device use asame preset sequence, to ensure that the first device and the seconddevice can switch to a same channel.

In this embodiment of this application, that the subchannel is in a busystate includes at least one of the following cases.

Case 2-1: The first device receives a second OBSS frame on thesubchannel.

Case 2-2: The first device detects no radio frame, but duration in whichthe first device determines that an energy detection result on thesubchannel is a busy state is greater than or equal to second presetduration.

In this embodiment of this application, in a process of performingbackoff on the subchannel, the first device performs energy detection onthe subchannel. When an energy detection value on the subchannel isgreater than or equal to the energy detection threshold, the firstdevice determines that the energy detection result on the subchannel isthe busy state. Alternatively, when an energy detection value on thesubchannel is less than the energy detection threshold, the first devicedetermines that the energy detection result on the subchannel is an idlestate.

It should be understood that, after the first device switches from theprimary 20 MHz channel to the first channel, because the first devicelacks a record of a related NAV on the first channel, if the firstdevice sets the energy detection threshold to −62 dBm according to anexisting CCA rule, channels of traditional stations may be preempted,and fairness is affected.

Based on this, in this embodiment of this application, the energydetection threshold of the subchannel is set to a value less than −62dBm and greater than −82 dBm, to ensure fairness.

Case 2-3: The first device determines that a value of a second NAV onthe subchannel is greater than 0.

In this embodiment of this application, an initial value of a backoffcounter on the first channel (or the subchannel on the first channel)may be set according to the following rules.

Rule 1: The first device sets the initial value of the backoff counteron the first channel (or the subchannel of the first channel) based on aminimum contention window CW_min or a contention window of the primary20 MHz channel.

Rule 2: When a count value of a backoff counter on the primary 20 MHzchannel is not 0, the first device sets the initial value of the backoffcounter on the first channel (or the subchannel on the first channel)based on the count value of the backoff counter on the primary 20 MHzchannel. Optionally, the contention window of the primary 20 MHz channelis a contention window of the first channel.

For example, the first device may set the initial value of the backoffcounter on the first channel (or the subchannel on the first channel) tothe count value of the backoff counter on the primary 20 MHz channel.

Rule 3: The first device sets the initial value of the backoff counteron the first channel (or the subchannel of the first channel) based on apreset contention window.

The preset contention window may be defined in a communication standard,or may be defined by the first device.

S104: After the first channel backs off to 0, the first device performsdata transmission with the second device.

Optionally, that the first channel backs off to 0 may mean that a targetsubchannel on the first channel backs off to 0. The target subchannel isany subchannel of the first channel.

Optionally, after the target subchannel backs off to 0, the first devicemay perform data transmission with the second device on the targetsubchannel. Alternatively, the first device may perform datatransmission on a third channel including the target subchannel. Inaddition to the target subchannel, the third channel may further includeanother subchannel that is in an idle state and that is of the firstchannel.

In a possible implementation, the first device and the second device maytransmit data of any service type on the first channel.

In another possible implementation, the first device and the seconddevice only transmit data of a target service type on the first channel,to ensure that the data of the target service type is transmitted. Inthis way, it can be avoided that a transmission delay of the data of thetarget service type is increased because data of a non-target servicetype preempts the first channel.

Optionally, the data of the target service type may be determined by thefirst device and the second device through negotiation, or may bedefined in a communication standard.

Based on the embodiment shown in FIG. 6(b), the first device performsbackoff on the first channel, to obtain an additional transmissionopportunity, so as to effectively reduce a transmission delay betweenthe first device and the second device, and increase a data transmissionthroughput between the first device and the second device.

Optionally, based on the embodiment shown in FIG. 6(a), as shown in FIG.6(c), after step S102, the data transmission method may further includestep S105.

S105: When a second preset condition is met, the first device switchesfrom the first channel to the primary 20 MHz channel.

In a possible implementation, the second preset condition is: beforeswitching duration reaches target duration, or when switching durationreaches target duration. Based on this implementation, a timer may beset for the first device, and timing duration of the timer is the targetduration. Therefore, before the timer expires, the first device maydetermine, based on an actual situation, whether to switch from thefirst channel to the primary 20 MHz channel. When the timer is about toexpire, the first device needs to switch from the first channel to theprimary 20 MHz channel.

In another possible implementation, the second preset condition is thatswitching duration reaches third preset duration. Based on thisimplementation, a timer may be set for the first device, and timingduration of the timer is the third preset duration. Therefore, beforethe timer expires, the first device does not perform an operation ofswitching from the first channel to the primary 20 MHz channel. When thetiming time of the timer reaches the third preset duration, the firstdevice switches from the first channel to the primary 20 MHz channel.

The switching duration is duration in which the first device switchesfrom the primary 20 MHz channel to the first channel. In other words,the switching duration is duration from a moment at which the firstdevice switches from the primary 20 MHz channel to the first channel toa current moment.

Optionally, the third preset duration is less than or equal to thetarget duration. The third preset duration may be determined by thefirst device and the second device through negotiation, or may bedefined in a standard.

Optionally, the target duration may be the remaining transmissionduration of the first OBSS frame received by the first device on theprimary 20 MHz channel. Alternatively, the target duration may be theremaining timing duration of the first NAV on the primary 20 MHzchannel.

In this embodiment of this application, that the first device switchesfrom the first channel to the primary 20 MHz channel may be specificallyimplemented as follows: The function module, such as the physical frameheader synchronization module or the packet parsing module, configuredfor the first device, processes a signal received on the primary 20 MHzchannel.

Optionally, if the target duration is the remaining transmissionduration of the first OBSS frame received by the first device on theprimary 20 MHz channel, after switching from the first channel to theprimary channel, the first device may continue to perform backoffaccording to the existing CCA rule.

It should be understood that, in a time period for receiving the firstOBSS frame, the primary 20 MHz channel is already occupied, anotherstation usually does not send another physical frame, and the firstdevice and the second device cannot continue to perform backoff on theprimary 20 MHz channel. Therefore, the first device and the seconddevice cannot transmit data on the primary 20 MHz channel. Therefore, inthe time period for receiving the first OBSS frame, the first devicedoes not miss another physical frame, so that the first device does notmiss an opportunity of updating the first NAV on the primary 20 MHzchannel. Therefore, even if the first device continues to performbackoff according to the existing CCA rule after switching from thefirst channel to the primary channel, transmission of another station isnot affected, and a fairness problem is not caused.

In the existing CCA rule, the energy detection threshold is −62 dBm.

Optionally, if the target duration is the remaining timing duration ofthe first NAV on the primary 20 MHz channel, after switching from thefirst channel to the primary 20 MHz channel, the first device needs toperform a blind recovery operation on the primary 20 MHz channel.

It should be understood that, within the remaining timing duration ofthe first NAV on the primary 20 MHz channel, another physical frame maybe transmitted on the primary 20 MHz channel. In this case, because thefirst device switches to the first channel, the first device missesreceiving the physical frame. If the physical frame causes the first NAVon the primary 20 MHz channel to be updated, the first device misses anupdate opportunity of the first NAV. In this way, the first device losesa NAV record on the primary 20 MHz channel. In this case, if the firstdevice performs backoff according to the existing CCA rule afterswitching from the first channel to the primary 20 MHz channel,transmission of another station may be affected. Therefore, from aperspective of fairness, after switching from the first channel to theprimary channel, the first device needs to perform the blind recoveryoperation.

For example, the blind recovery operation may include that the firstdevice sets fourth preset duration after switching to the primary 20 MHzchannel. Within the fourth preset duration, the energy detectionthreshold of the CCA is a value between −62 dBm and −82 dBm. Inaddition, after performing backoff, the first device needs to firstperform request to send/clear to send (RTS/CTS) interaction beforetransmitting data. The fourth preset duration may be referred to as aNAVSyncDELAY time period. The fourth preset duration is duration at amillisecond level, for example, 5 milliseconds.

Optionally, if the target duration is the remaining timing duration ofthe first NAV on the primary 20 MHz channel, after switching from thefirst channel to the primary 20 MHz channel, the first device continuesto perform backoff according to the existing CCA rule.

It should be understood that although the first device may miss anupdate opportunity of the first NAV on the primary 20 MHz channel withinthe remaining timing duration of the first NAV on the primary 20 MHzchannel, a probability of missing the update opportunity is low.Therefore, when the update opportunity of the first NAV of the primary20 MHz channel is not missed by default, after switching from the firstchannel to the primary 20 MHz channel, the first device continues toperform backoff according to the existing CCA rule, so that the firstdevice can obtain a channel through contention as soon as possible.

Based on the embodiment shown in FIG. 6(c), when the second presetcondition is met, the first device switches from the first channel tothe primary 20 MHz channel, so that the first device and the seconddevice can transmit data on the primary 20 MHz channel.

In addition, when the second preset condition is met, there is a lowprobability that the first device misses the NAV update opportunity onthe primary 20 MHz channel, so that the first device can perform backoffon the primary 20 MHz channel according to the existing CCA rule.

For the second device, FIG. 7(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S201: The second device performs backoff on the primary 20 MHz channel,to perform data transmission with the first device.

S202: When the first preset condition is met, the second device switchesfrom the primary 20 MHz channel to the first channel.

Steps S201 and S202 are similar to steps S101 and S102 in FIG. 6(a). Forspecific details, refer to the embodiment shown in FIG. 6(a).

It should be understood that the first device performs the embodimentshown in FIG. 6(a), and the second device performs the embodiment shownin FIG. 7(a), to ensure that the first device and the second deviceswitch from the primary 20 MHz channel to the first channel under a samecondition. Therefore, the first device and the second device may obtainan additional transmission opportunity on the first channel to performdata transmission, to reduce a data transmission delay caused becausethe primary 20 MHz channel is busy.

Optionally, based on the embodiment shown in FIG. 7(a), as shown in FIG.7(b), after step S202, the data transmission method may further includestep S203. Optionally, the data transmission method may further includestep S204.

S203: The second device performs backoff on the first channel.

S204: After the first channel backs off to 0, the second device performsdata transmission with the first device.

Steps S203 and S204 are similar to steps S103 and S104 in FIG. 6(b). Forspecific details, refer to the embodiment shown in FIG. 6(b).

Based on the embodiment shown in FIG. 7(b), the second device performsbackoff on the first channel, to obtain an additional transmissionopportunity, so as to effectively reduce a transmission delay betweenthe first device and the second device.

Optionally, based on the embodiment shown in FIG. 7(a), as shown in FIG.7(c), after step S202, the data transmission method may further includestep S205.

S205: When the second preset condition is met, the second deviceswitches from the first channel to the primary 20 MHz channel.

Step S205 is similar to step S105 in FIG. 6(c). For specific details,refer to the embodiment shown in FIG. 6(c).

It should be understood that the first device performs step S105 in FIG.6(c), and the second device performs step S205 in FIG. 7(c), to ensurethat the first device and the second device switch from the firstchannel to the primary 20 MHz channel as synchronously as possible. Inthis way, the first device and the second device may communicate on theprimary 20 MHz channel.

The following describes a specific implementation in which the firstdevice and the second device negotiate to determine the first channel.It should be understood that the following embodiments shown in FIG.8(a), FIG. 8(b), FIG. 9(a), or FIG. 9(b) may be used in combination withthe embodiments shown in FIG. 6(a), FIG. 6(b), FIG. 6(c), FIG. 7(a),FIG. 7(b), and FIG. 7(c).

In a possible example, FIG. 8(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S301: The first device generates first indication information.

The first indication information is carried in a management frame, acontrol frame, or an action frame. The first indication information maybe carried in an existing frame or a newly added frame.

In this embodiment of this application, the first indication informationis used to configure the first channel, and any one of the followingimplementations may be used:

Implementation 1: The first indication information includes an index ofthe first channel. Alternatively, the first indication informationincludes an index of each subchannel of the first channel.

Implementation 2: The first indication information includes a bitmap,where the bitmap includes a plurality of bits, and each bit correspondsto one 20 MHz channel. For each bit in the bitmap, when a value of a bitis a first value, a 20 MHz channel corresponding to the bit is asubchannel of the first channel. When a value of a bit is a secondvalue, a 20 MHz channel corresponding to the bit is not a subchannel ofthe first channel. For example, the first value is 1, and the secondvalue is 0. Alternatively, the first value is 0, and the second valueis 1. It should be understood that, when the bitmap includes a bitcorresponding to the primary 20 MHz channel, the bit corresponding tothe primary 20 MHz channel is set to the second value by default.

Optionally, the first indication information is applicable only to thesecond device. Therefore, the first channel indicated by the firstindication information is only a channel for communication between thefirst device and the second device. In this case, a radio frame thatcarries the first indication information may further carry indicationinformation used to configure a channel for communication between thefirst device and another device.

Optionally, the first indication information is applicable to aplurality of devices associated with a transmit end (that is, the firstdevice). Therefore, the first channel indicated by the first indicationinformation is not only a channel for communication between the firstdevice and the second device, but also a channel for communicationbetween the first device and another device.

In a possible implementation, the first device may determine a locationof the first channel in a frequency band based on an actual situation(for example, a load status of each secondary channel). Then, the firstdevice generates the first indication information based on the locationof the first channel in the frequency band.

S302: The first device sends the first indication information to thesecond device. Correspondingly, the second device receives the firstindication information sent by the first device.

It should be understood that after receiving the first indicationinformation, the second device may determine the first channel based onthe first indication information.

Based on the embodiment shown in FIG. 8(a), the first device sends thefirst indication information to the second device, so that the firstdevice and the second device can determine a same first channel.

In another possible example, FIG. 8(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S401: The second device generates first indication information.

For related descriptions of the first indication information, refer tothe foregoing description.

S402: The second device sends the first indication information to thefirst device. Correspondingly, the first device receives the firstindication information sent by the second device.

It should be understood that after receiving the first indicationinformation, the first device may determine the first channel based onthe first indication information.

Based on the embodiment shown in FIG. 8(b), the second device sends thefirst indication information to the first device, so that the firstdevice and the second device can determine a same first channel.

In another possible example, FIG. 9(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S501: The first device sends first request information to the seconddevice. Correspondingly, the second device receives the first requestinformation sent by the first device.

The first request information may be carried in an association requestframe, or a control type in an A-Control field, or a request frame of anindependent frame type.

In this embodiment of this application, the first request information isused to request to negotiate the first channel.

In a possible implementation, the first request information does notindicate a recommended first channel.

In another possible implementation, the first request informationfurther indicates a recommended first channel. The recommended firstchannel is a first channel recommended by the first device to be used bythe second device, but is not necessarily an actually used firstchannel.

Optionally, the first request information further indicates therecommended first channel, and any one of the following implementationsmay be used:

Implementation 1: The first request information includes an index of therecommended first channel. Alternatively, the first request informationincludes an index of each subchannel of the recommended first channel.

Implementation 2: The first request information includes a bitmap, wherethe bitmap includes a plurality of bits, and each bit corresponds to one20 MHz channel. For each bit in the bitmap, when a value of a bit is afirst value, a 20 MHz channel corresponding to the bit is a subchannelof the recommended first channel. When a value of a bit is a secondvalue, a 20 MHz channel corresponding to the bit is not a subchannel ofthe recommended first channel. For example, the first value is 1, andthe second value is 0. Alternatively, the first value is 0, and thesecond value is 1. It should be understood that, when the bitmapincludes a bit corresponding to the primary 20 MHz channel, the bitcorresponding to the primary 20 MHz channel is set to the second valueby default.

S502: The second device sends first response information to the firstdevice. Correspondingly, the first device receives the first responseinformation sent by the second device.

The first response information is used to respond to the first requestinformation. The first response information may be carried in anassociation response frame, or a control type in an A-Control, or aresponse frame of an independent frame type.

In this embodiment of this application, the first response informationis used to determine the first channel.

In a possible implementation, if the first indication information doesnot indicate the recommended first channel, the first responseinformation is further used to configure the first channel.

In another possible implementation, if the first indication informationfurther indicates the recommended first channel, the first responseinformation is further used to agree to use the recommended firstchannel, or the first response information is further used to configurethe first channel.

It should be understood that if the first response information is usedto agree to use the recommended first channel, the recommended firstchannel is the actually used first channel.

Optionally, the first response information is further used to configurethe first channel, and any one of the following implementations may beused:

Implementation 1: The first response information includes an index ofthe first channel. Alternatively, the first response informationincludes an index of each subchannel of the first channel.

Implementation 2: The first response information includes a bitmap,where the bitmap includes a plurality of bits, and each bit correspondsto one 20 MHz channel. For each bit in the bitmap, when a value of a bitis a first value, a 20 MHz channel corresponding to the bit is asubchannel of the first channel. When a value of a bit is a secondvalue, a 20 MHz channel corresponding to the bit is not a subchannel ofthe first channel. For example, the first value is 1, and the secondvalue is 0. Alternatively, the first value is 0, and the second valueis 1. It should be understood that, when the bitmap includes a bitcorresponding to the primary 20 MHz channel, the bit corresponding tothe primary 20 MHz channel is set to the second value by default.

It should be understood that both the first device and the second devicedetermine the first channel based on the first response information.

Based on the embodiment shown in FIG. 9(a), the first device and thesecond device can determine a same first channel based on an interactionprocess of the first request information and the first responseinformation.

In another possible example, FIG. 9(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S601: The second device sends first request information to the firstdevice. Correspondingly, the first device receives the first requestinformation sent by the second device.

S602: The first device sends first response information to the seconddevice. Correspondingly, the second device receives the first responseinformation sent by the first device.

For specific descriptions of the first request information and the firstresponse information, refer to the foregoing description.

Based on the embodiment shown in FIG. 9(b), the first device and thesecond device can determine a same first channel based on an interactionprocess of the first request information and the first responseinformation.

For ease of description, a transmission mechanism described in theembodiments shown in FIG. 6(a) and FIG. 7(a) is defined as a firsttransmission mechanism in this embodiment of this application.Specifically, the first transmission mechanism is used by the firstdevice and the second device to switch from the primary 20 MHz channelto the first channel when the first preset condition is met.

In a possible implementation, the first transmission mechanism may beenabled by default between the first device and the second device.

In another possible implementation, the first device and the seconddevice may negotiate whether to enable the first transmission mechanism,so that flexibility can be improved, and the first transmissionmechanism can be used in different application scenarios.

For example, when a problem of a hidden node is serious because adistance between the first device and the second device is long, even ifthe first transmission mechanism is enabled between the first device andthe second device, there is a high probability that the first device andthe second device cannot simultaneously switch to the first channel, andtherefore cannot perform normal communication on the first channel.Therefore, in this scenario, the first device and the second device maynegotiate to disable the first transmission mechanism, to simplifyrelated operations of the first device and the second device.

It should be understood that after the first transmission mechanism isdisabled, the first device does not perform the embodiment shown in FIG.6(a), and the second device does not perform the embodiment shown inFIG. 7(a). After the first transmission mechanism is enabled, the firstdevice may perform the embodiment shown in FIG. 6(a), and the seconddevice may perform the embodiment shown in FIG. 7(a).

With reference to an embodiment, the following describes a specificimplementation in which the first device and the second device negotiatewhether to enable the first transmission mechanism.

In a possible example, FIG. 10(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S701: The first device generates second indication information.

The second indication information indicates whether to enable the firsttransmission mechanism. Alternatively, the second indication informationindicates whether to disable the first transmission mechanism.

Optionally, the second indication information may be carried in amanagement frame, a control frame, or an A-control field.

In a possible implementation, the second indication information isinformation specially sent to the second device.

In another possible implementation, the second indication information isinformation broadcast to another device associated with the firstdevice. It should be understood that another device associated with thefirst device includes the second device.

S702: The first device sends the second indication information to thesecond device. Correspondingly, the second device receives the secondindication information sent by the first device.

S703: The second device determines, based on the second indicationinformation, whether to enable the first transmission mechanism.

It should be understood that, when the second indication informationindicates to enable the first transmission mechanism, the second devicedetermines to enable the first transmission mechanism. Alternatively,when the second indication information indicates to disable the firsttransmission mechanism, the second device determines to disable thefirst transmission mechanism.

Based on the embodiment shown in FIG. 10(a), the first device sends thesecond indication information to the second device, to determine whetherto enable the first transmission mechanism between the first device andthe second device.

In another possible example, FIG. 10(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S801: The second device generates second indication information.

The second indication information indicates whether to enable the firsttransmission mechanism. Alternatively, the second indication informationindicates whether to disable the first transmission mechanism.

Optionally, the second indication information may be carried in amanagement frame, a control frame, or an A-control field.

In a possible implementation, the second indication information isinformation specially sent to the first device.

In another possible implementation, the second indication information isinformation broadcast to another device associated with the seconddevice. It should be understood that another device associated with thesecond device includes the first device.

S802: The second device sends the second indication information to thefirst device. Correspondingly, the first device receives the secondindication information sent by the second device.

S803: The first device determines, based on the second indicationinformation, whether to enable the first transmission mechanism.

It should be understood that, when the second indication informationindicates to enable the first transmission mechanism, the first devicedetermines to enable the first transmission mechanism. Alternatively,when the second indication information indicates to disable the firsttransmission mechanism, the first device determines to disable the firsttransmission mechanism.

Based on the embodiment shown in FIG. 10(b), the second device sends thesecond indication information to the first device, to determine whetherto enable the first transmission mechanism between the first device andthe second device.

In another possible example, FIG. 11(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S901: The first device sends second request information to the seconddevice. Correspondingly, the second device receives the second requestinformation sent by the first device.

The second request information is used to request to enable the firsttransmission mechanism. Alternatively, the second request information isused to request to disable the first transmission mechanism.

Optionally, the second request information may be carried in amanagement frame, a control frame, or an A-control field.

S902: The second device sends second response information to the firstdevice. Correspondingly, the first device receives the second responseinformation sent by the second device.

In this embodiment of this application, the second response informationis used to respond to the second request information. Optionally, thesecond response information may be carried in a management frame, acontrol frame, or an A-control field.

Optionally, when the second request information is used to request toenable the first transmission mechanism, the second response informationis used to agree to or refuse to enable the first transmissionmechanism.

It should be understood that, when the second response information isused to agree to enable the first transmission mechanism, the firsttransmission mechanism is enabled between the first device and thesecond device. Alternatively, when the second response information isused to refuse to enable the first transmission mechanism, the firsttransmission mechanism is disabled between the first device and thesecond device.

Optionally, when the second request information is used to request todisable the first transmission mechanism, the second responseinformation is used to agree to or refuse to disable the firsttransmission mechanism.

It should be understood that, when the second response information isused to agree to disable the first transmission mechanism, the firsttransmission mechanism is disabled between the first device and thesecond device. Alternatively, when the second response information isused to refuse to disable the first transmission mechanism, the firsttransmission mechanism is enabled between the first device and thesecond device.

Based on the embodiment shown in FIG. 11(a), the second device and thefirst device determine, based on interaction between the second requestinformation and the second response information, whether to enable thefirst transmission mechanism.

In another possible example, FIG. 11(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S1001: The second device sends second request information to the firstdevice. Correspondingly, the first device receives the second requestinformation sent by the second device.

S1002: The first device sends second response information to the seconddevice. Correspondingly, the second device receives the second responseinformation sent by the first device.

For specific descriptions of the second request information and thesecond response information, refer to the foregoing description.

Based on the embodiment shown in FIG. 11(b), the second device and thefirst device determine, based on interaction between the second requestinformation and the second response information, whether to enable thefirst transmission mechanism.

The following describes a specific implementation in which the firstdevice and the second device negotiate to determine a service type ofdata transmitted on the first channel. It should be understood that thefollowing embodiments shown in FIG. 12(a), FIG. 12(b), FIG. 13(a), orFIG. 13(b) may be used in combination with the embodiments shown in FIG.6(a), FIG. 6(b), FIG. 6(c), FIG. 7(a), FIG. 7(b), and FIG. 7(c).

In a possible example, FIG. 12(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S1101: The first device generates third indication information.

The third indication information indicates a service type of datatransmitted on the first channel.

For example, the third indication information may include one or moreidentifiers of the service type. Therefore, the identifier of theservice type included in the third indication information is used todetermine a service type of data that is allowed to be transmitted onthe first channel.

Optionally, the identifier of the service type may be an access category(AC) or a service identifier (traffic identifier, TID).

For example, a type of the AC may be shown in Table 1.

TABLE 1 ACI AC Description 0 AC_BE Best effort service (best effort) 1AC_BK Background service (background) 2 AC_VI Video service (video) 3AC_VO Voice service (voice)

For example, the third indication information may indicate that datacorresponding to AC_VO and/or AC_VI is transmitted on the first channel.

In this embodiment of this application, the third indication informationmay be carried in a management frame, a control frame, or an A-controlfield.

S1102: The first device sends the third indication information to thesecond device. Correspondingly, the second device receives the thirdindication information sent by the first device.

S1103: The second device determines, based on the third indicationinformation, the service type of the data transmitted on the firstchannel.

Based on the embodiment shown in FIG. 12(a), the second device maydetermine, based on the third indication information sent by the firstdevice, service types of data that is allowed to be transmitted on thefirst channel, to reduce a transmission delay of data of these servicetypes.

In another possible example, FIG. 12(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S1201: The second device generates third indication information.

S1202: The second device sends the third indication information to thefirst device. Correspondingly, the first device receives the thirdindication information sent by the second device.

S1203: The first device determines, based on the third indicationinformation, a service type of data transmitted on the first channel.

For a specific description of the third indication information, refer tothe foregoing description.

Based on the embodiment shown in FIG. 12(b), the first device maydetermine, based on the third indication information sent by the firstdevice, service types of data that is allowed to be transmitted on thefirst channel, to reduce a transmission delay of data of these servicetypes.

In another possible example, FIG. 13(a) shows a data transmission methodaccording to an embodiment of this application. The method includes thefollowing steps.

S1301: The first device sends third request information to the seconddevice. Correspondingly, the second device receives the third requestinformation sent by the first device.

The third request information is used to request to negotiate a servicetype of data transmitted on the first channel.

In a possible implementation, the third request information includesidentifiers of one or more recommended service types.

In another possible implementation, the third request information doesnot include identifiers of one or more recommended service types.

In this embodiment of this application, the third request information iscarried in a management frame, a control frame, or an A-control field.

S1302: The second device sends third response information to the firstdevice. Correspondingly, the first device receives the third responseinformation sent by the second device.

The third response information is used to respond to the third requestinformation. The third response information is used to determine theservice type of the data transmitted on the first channel.

In a possible implementation, when the third request information doesnot include identifiers of one or more recommended service types, thethird response information includes identifiers of one or morerecommended service types of data transmitted on the first channel.

In another possible implementation, when the third request informationincludes identifiers of one or more recommended service types, the thirdresponse information indicates that data of the one or more recommendedservice types is allowed to be transmitted on the first channel, or thethird response information includes identifiers of one or more servicetypes of the data transmitted on the first channel.

It should be understood that the first device and the second devicedetermine, based on the third response information, the service type ofthe data transmitted on the first channel.

Based on the embodiment shown in FIG. 13(a), the first device and thesecond device may determine, based on interaction between the thirdrequest information and the third response information, service types ofdata that is allowed to be transmitted on the first channel, to reduce atransmission delay of data of these service types.

In another possible example, FIG. 13(b) shows another data transmissionmethod according to an embodiment of this application. The methodincludes the following steps.

S1401: The second device sends third request information to the firstdevice. Correspondingly, the first device receives the third requestinformation sent by the second device.

S1402: The first device sends third response information to the seconddevice. Correspondingly, the second device receives the third responseinformation sent by the first device.

For specific descriptions of the third request information and the thirdresponse information description, refer to the foregoing description.

Based on the embodiment shown in FIG. 13(b), the first device and thesecond device may determine, based on interaction between the thirdrequest information and the third response information, service types ofdata that is allowed to be transmitted on the first channel, to reduce atransmission delay of data of these service types.

The foregoing mainly describes the solutions provided in embodiments ofthis application from a perspective of a communication apparatus (forexample, the first device or the second device). It may be understoodthat, to implement the foregoing functions, the communication apparatusincludes a corresponding hardware structure and/or software module forperforming each function. A person skilled in the art should be awarethat, in combination with units and algorithm steps of the examplesdescribed in embodiments disclosed in this specification, thisapplication may be implemented by hardware or a combination of hardwareand computer software. Whether a function is performed by hardware orhardware driven by computer software depends on particular applicationsand implementation constraints of the technical solutions. A personskilled in the art may use different methods to implement the describedfunctions for each particular application, but it should not beconsidered that the implementation goes beyond the scope of thisapplication.

In embodiments of this application, the apparatus may be divided intofunctional modules based on the foregoing method examples. For example,each functional module may be obtained through division based on eachcorresponding function, or two or more functions may be integrated intoone functional module. The integrated module may be implemented in aform of hardware, or may be implemented in a form of a softwarefunctional module. In this embodiment of this application, moduledivision is an example, and is merely a logical function division. Inactual implementation, another division manner may be used. An examplein which each function module is obtained through division based on eachcorresponding function is used below for description.

FIG. 14 shows a communication apparatus according to an embodiment ofthis application. The communication apparatus includes a backoff module101, a switching module 102, and a communication module 103.

In a possible implementation, when the communication apparatus serves asthe first device, the backoff module 101 is configured to perform stepS101 in FIG. 6(a) and step S103 in FIG. 6(b). The switching module 102is configured to perform step S102 in FIG. 6(a) and step S105 in FIG.6(c). The communication module 103 is configured to perform step S104 inFIG. 6(b), step S302 in FIG. 8(a), step S402 in FIG. 8(b), steps S501and S502 in FIG. 9(a), steps S601 and S602 in FIG. 9(b), step S702 inFIG. 10(a), step S802 in FIG. 10(b), steps S901 and S902 in FIG. 11(a),steps S1001 and S1002 in FIG. 11(b), step S1102 in FIG. 12(a), stepS1202 in FIG. 12(b), steps S1301 and S1302 in FIG. 13(a), and stepsS1401 and S1402 in FIG. 13(b).

In a possible implementation, when the communication apparatus serves asthe second device, the backoff module 101 is configured to perform stepS201 in FIG. 7(a) and step S203 in FIG. 7(b). The switching module 102is configured to perform step S202 in FIG. 7(a) and step S205 in FIG.7(c). The communication module 103 is configured to perform step S204 inFIG. 7(b), step S302 in FIG. 8(a), step S402 in FIG. 8(b), steps S501and S502 in FIG. 9(a), steps S601 and S602 in FIG. 9(b), step S702 inFIG. 10(a), step S802 in FIG. 10(b), steps S901 and S902 in FIG. 11(a),steps S1001 and S1002 in FIG. 11(b), step S1102 in FIG. 12(a), stepS1202 in FIG. 12(b), steps S1301 and S1302 in FIG. 13(a), and stepsS1401 and S1402 in FIG. 13(b).

It should be understood that the backoff module 101 and the switchingmodule 102 may be integrated into a processing module.

FIG. 15 is a diagram of a structure of a possible product form of acommunication apparatus according to an embodiment of this application.

In a possible product form, the communication apparatus in thisembodiment of this application may be the foregoing first device, andthe first device includes a processor 201 and a transceiver 202.Optionally, the communication device further includes a storage medium203.

The processor 201 is configured to perform step S101 in FIG. 6(a), stepS103 in FIG. 6(b), step S102 in FIG. 6(a), and step S105 in FIG. 6(c).The transceiver 202 is configured to perform step S104 in FIG. 6(b),step S302 in FIG. 8(a), step S402 in FIG. 8(b), steps S501 and S502 inFIG. 9(a), steps S601 and S602 in FIG. 9(b), step S702 in FIG. 10(a),step S802 in FIG. 10(b), steps S901 and S902 in FIG. 11(a), steps S1001and S1002 in FIG. 11(b), step S1102 in FIG. 12(a), step S1202 in FIG.12(b), steps S1301 and S1302 in FIG. 13(a), and steps S1401 and S1402 inFIG. 13(b).

In another possible product form, the communication apparatus in thisembodiment of this application may be the foregoing second device, andthe second device includes a processor 201 and a transceiver 202.Optionally, the communication device further includes a storage medium203.

The processor 201 is configured to perform step S201 in FIG. 7(a), stepS203 in FIG. 7(b), step S202 in FIG. 7(a), and step S205 in FIG. 7(c).The transceiver 202 is configured to perform step S204 in FIG. 7(b),step S302 in FIG. 8(a), step S402 in FIG. 8(b), steps S501 and S502 inFIG. 9(a), steps S601 and S602 in FIG. 9(b), step S702 in FIG. 10(a),step S802 in FIG. 10(b), steps S901 and S902 in FIG. 11(a), steps S1001and S1002 in FIG. 11(b), step S1102 in FIG. 12(a), step S1202 in FIG.12(b), steps S1301 and S1302 in FIG. 13(a), and steps S1401 and S1402 inFIG. 13(b).

In another possible product form, the communication apparatus in thisembodiment of this application may be implemented by using a chip. Thechip includes a processing circuit 201 and a transceiver pin 202.Optionally, the chip may further include a storage medium 203.

In another possible product form, the communication apparatus in thisembodiment of this application may alternatively be implemented by usingthe following circuit or component: one or more field programmable gatearrays (FPGA), a programmable logic device (PLD), a controller, a statemachine, gate logic, a discrete hardware component, any other suitablecircuits, or any combination of circuits that can perform variousfunctions described in this application.

Optionally, an embodiment of this application further provides acomputer-readable storage medium. The computer-readable storage mediumstores computer instructions. When the computer instructions are run ona computer, the computer is enabled to perform the communication methodin the foregoing method embodiments.

Optionally, an embodiment of this application further provides acomputer program product including computer instructions. When thecomputer instructions are run on a computer, the computer is enabled toperform the communication method in the foregoing method embodiments.

It should be understood that the computer instructions may be stored ina computer-readable storage medium or may be transmitted from acomputer-readable storage medium to another computer-readable storagemedium. For example, the computer instructions may be transmitted from awebsite, computer, server, or data center to another website, computer,server, or data center in a wired (for example, a coaxial cable, anoptical fiber, or a digital subscriber line) or wireless (for example,infrared, radio, or microwave) manner. The computer-readable storagemedium may be any usable medium accessible by a computer, or a datastorage device, for example, a server or a data center, integrating oneor more usable media. The usable medium may be a magnetic medium (forexample, a floppy disk, a hard disk, or a magnetic tape), an opticalmedium, a semiconductor medium (for example, a solid-state drive), orthe like.

Based on the foregoing descriptions of the implementations, a personskilled in the art may understand that for the purpose of convenient andbrief descriptions, division into the foregoing functional modules ismerely used as an example for description. During actual application,the foregoing functions can be allocated to different functional modulesfor implementation based on a requirement, that is, an inner structureof an apparatus is divided into different functional modules toimplement all or some of the functions described above.

It should be understood that the apparatus and method disclosed in theseveral embodiments provided in this application may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, division into the modules or the units ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another apparatus, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented through some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electrical, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may be one or more physicalunits, may be located in one place, or may be distributed on differentplaces. Some or all of the units may be selected according to actualrequirements to achieve the objectives of the solutions of theembodiments.

In addition, function units in embodiments of this application may beintegrated into one processing unit, or each of the units may existalone physically, or two or more units may be integrated into one unit.The integrated unit may be implemented in a form of hardware, or may beimplemented in a form of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunction unit and sold or used as an independent product, the integratedunit may be stored in a readable storage medium. Based on such anunderstanding, the technical solutions of this application essentially,or the part contributing to the conventional technology, or all or someof the technical solutions may be implemented in the form of a softwareproduct. The software product is stored in a storage medium and includesseveral instructions for instructing a device (which may be asingle-chip microcomputer, a chip or the like) or a processor to performall or some of steps of the methods described in embodiments of thisapplication.

The foregoing descriptions are merely specific implementations of thisapplication, but are not intended to limit the protection scope of thisapplication. Any variation or replacement within the technical scopedisclosed in this application shall fall within the protection scope ofthis application. Therefore, the protection scope of this applicationshall be subject to the protection scope of the claims.

1. A data transmission method, comprising: performing, by a firstdevice, data transmission with a second device by performing backoff ona primary 20 megahertz (MHz) channel; and when a first preset conditionis met, switching, by the first device, from the primary 20 MHz channelto a first channel preconfigured for communication between the firstdevice and the second device, wherein the first channel does not includethe primary 20 MHz channel, and the first preset condition includes, atleast, the primary 20 MHz channel being in a busy state.
 2. The methodaccording to claim 1, wherein the primary 20 MHz channel being in thebusy state comprises at least one of: the first device receives a firstoverlapped basic service set (OBSS) frame on the primary 20 MHz channel;the first device determines that an energy detection result on theprimary 20 MHz channel includes a busy state; or the first devicedetermines that a value of a first network allocation vector (NAV) onthe primary 20 MHz channel is greater than
 0. 3. The method according toclaim 2, wherein the first preset condition further includes a targetduration is greater than or equal to a first preset duration, and thetarget duration includes a remaining transmission duration of the firstOBSS frame received by the first device on the primary 20 MHz channel,or the target duration includes the remaining timing duration of thefirst NAV on the primary 20 MHz channel.
 4. The method according toclaim 1, further comprising: performing, by the first device, backoff onthe first channel; and after the first channel backs off to 0,performing, by the first device, data transmission with the seconddevice on the first channel.
 5. The method according to claim 4, whereinwhen the first channel includes a plurality of subchannels, performing,by the first device, backoff on the first channel comprises: performing,by the first device, backoff on each of the plurality of subchannels. 6.The method according to claim 5, further comprising: if the first devicesynchronizes to a physical frame header on any subchannel of theplurality of subchannels, suspending, by the first device, backoff onall subchannels of the plurality of subchannels, and determining whethera physical frame corresponding to the physical frame header is an OBSSframe; and (a) if the physical frame corresponding to the physical frameheader is the OBSS frame, continuing, by the first device, to performbackoff on each subchannel of the plurality of subchannels; (b) if thephysical frame corresponding to the physical frame header is not theOBSS frame, continuing, by the first device, to suspend backoff on allsubchannels of the plurality of subchannels until transmission of thephysical frame corresponding to the physical frame header is completed;or (c) if the physical frame corresponding to the physical frame headeris not the OBSS frame, continuing, by the first device, to suspendbackoff on all subchannels of the plurality of subchannels until an NAVconfigured for the physical frame corresponding to the physical frameheader is reduced to
 0. 7. The method according to claim 5, furthercomprising: receiving, by the first device, a physical frame on anysubchannel of the plurality of subchannels; and (a) if the first devicedetermines that the physical frame is from a BSS to which the firstdevice belongs, suspending, by the first device, backoff on allsubchannels of the plurality of subchannels until transmission of thephysical frame is completed; or (b) if the first device determines thatthe physical frame is from the BSS to which the first device belongs,suspending, by the first device, backoff on all subchannels of theplurality of subchannels until an NAV configured for the physical frameis reduced to
 0. 8. A communication apparatus applied for a firstdevice, the communication apparatus comprising: at least one processor;and at least one memory coupled to the at least one processor, the atleast one memory storing instructions for execution by the at least oneprocessor to cause the communication apparatus to: perform datatransmission with a second device by performing backoff on a primary 20megahertz (MHz) channel; and when a first preset condition is met,switch from the primary 20 MHz channel to a first channel preconfiguredfor communication between the communication apparatus and the seconddevice, wherein the first channel does not include the primary 20 MHzchannel, and the first preset condition includes, at least, the primary20 MHz channel being in a busy state.
 9. The communication apparatusaccording to claim 8, wherein the primary 20 MHz channel being in thebusy state comprises at least one of: the communication apparatusreceives a first overlapped basic service set (OBSS) frame on theprimary 20 MHz channel; the communication apparatus determines that anenergy detection result on the primary 20 MHz channel includes a busystate; or the communication apparatus determines that a value of a firstnetwork allocation vector (NAV) on the primary 20 MHz channel is greaterthan
 0. 10. The communication apparatus according to claim 9, whereinthe first preset condition further includes a target duration is greaterthan or equal to a first preset duration, and the target durationincludes a remaining transmission duration of the first OBSS framereceived by the communication apparatus on the primary 20 MHz channel,or the target duration includes the remaining timing duration of thefirst NAV on the primary 20 MHz channel.
 11. The communication apparatusaccording to claim 8, wherein the communication apparatus is furthercaused to: perform backoff on the first channel; and after the firstchannel backs off to 0, perform data transmission with the second deviceon the first channel.
 12. The communication apparatus according to claim11, wherein when the first channel includes a plurality of subchannels,performing backoff on the first channel comprises: performing backoff oneach of the plurality of subchannels.
 13. The communication apparatusaccording to claim 12, wherein the communications apparatus is furthercaused to: if the communication apparatus synchronizes to a physicalframe header on any subchannel of the plurality of subchannels, suspendbackoff on all subchannels of the plurality of subchannels, anddetermine whether a physical frame corresponding to the physical frameheader is an OBSS frame; and (a) if the physical frame corresponding tothe physical frame header is the OBSS frame, continue to perform backoffon each subchannel of the plurality of subchannels; (b) if the physicalframe corresponding to the physical frame header is not the OBSS frame,continue to suspend backoff on all subchannels of the plurality ofsubchannels until transmission of the physical frame corresponding tothe physical frame header is completed; or (c) if the physical framecorresponding to the physical frame header is not the OBSS frame,continue to suspend backoff on all subchannels of the plurality ofsubchannels until an NAV configured for the physical frame correspondingto the physical frame header is reduced to
 0. 14. The communicationapparatus according to claim 12, wherein the communication apparatus isfurther caused to: receive a physical frame on any subchannel of theplurality of subchannels; and (a) if the communication apparatusdetermines that the physical frame is from a BSS to which thecommunication apparatus belongs, suspend backoff on all subchannels ofthe plurality of subchannels until transmission of the physical frame iscompleted; or (b) if the communication apparatus determines that thephysical frame is from the BSS to which the communication apparatusbelongs, suspend backoff on all subchannels of the plurality ofsubchannels until an NAV configured for the physical frame is reduced to0.
 15. A chip applied for a first device, the chip comprising: aprocessing circuit; and a transceiver pin, wherein the processingcircuit is configured to: perform data transmission with a second deviceby performing backoff on a primary 20 megahertz (MHz) channel; and whena first preset condition is met, switch from the primary 20 MHz channelto a first channel preconfigured for communication between the firstdevice and the second device, wherein the first channel does not includethe primary 20 MHz channel, and the first preset condition includes, atleast, the primary 20 MHz channel being in a busy state.
 16. The chipaccording to claim 15, wherein the primary 20 MHz channel being in thebusy state includes at least one of: the first device receives a firstoverlapped basic service set (OBSS) frame on the primary 20 MHz channel;the first device determines that an energy detection result on theprimary 20 MHz channel includes a busy state; or the first devicedetermines that a value of a first network allocation vector (NAV) onthe primary 20 MHz channel is greater than
 0. 17. The chip according toclaim 16, wherein the first preset condition further includes a targetduration is greater than or equal to a first preset duration, and thetarget duration includes a remaining transmission duration of the firstOBSS frame received by the first device on the primary 20 MHz channel,or the target duration includes the remaining timing duration of thefirst NAV on the primary 20 MHz channel.
 18. The chip according to anyone of claims 15, wherein the processing circuit is further configuredto: perform backoff on the first channel; and after the first channelbacks off to 0, perform data transmission with the second device on thefirst channel.
 19. The chip according to claim 18, wherein when thefirst channel includes a plurality of subchannels, performing backoff onthe first channel comprises: performing backoff on each of the pluralityof subchannels.
 20. The chip according to claim 19, wherein theprocessing circuit is further configured to: if the first devicesynchronizes to a physical frame header on any subchannel of theplurality of subchannels, suspend backoff on all subchannels of theplurality of subchannels, and determine whether a physical framecorresponding to the physical frame header is an OBSS frame; and (a) ifthe physical frame corresponding to the physical frame header is theOBSS frame, continue to perform backoff on each subchannel of theplurality of subchannels; (b) if the physical frame corresponding to thephysical frame header is not the OBSS frame, continue to suspend backoffon all subchannels of the plurality of subchannels until transmission ofthe physical frame corresponding to the physical frame header iscompleted; or (c) if the physical frame corresponding to the physicalframe header is not the OBSS frame, continue to suspend backoff on allsubchannels of the plurality of subchannels until an NAV configured forthe physical frame corresponding to the physical frame header is reducedto 0.